//
//  DetailCashTableViewCell.m
//  SmartCoin
//
//  Created by apple on 2018/3/14.
//  Copyright © 2018年 Cynic. All rights reserved.
//

#import "DetailCashTableViewCell.h"

@implementation DetailCashTableViewCell
/**
 @property (nonatomic ,retain)UILabel *timelabel;
 @property (nonatomic ,retain)UILabel *cashMoneylabel;
 @property (nonatomic ,retain)UILabel *getCashlabel;
 @property (nonatomic ,retain)UILabel *idlabel;
 @property (nonatomic ,retain)UIButton *statusBtn;
 */
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    UIView *bgview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, cx_wid, 120)];
    bgview.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:bgview];
    NSArray *titles = @[@"",@"提现金额",@"到账金额"];
    for (NSInteger index = 0; index < 3; index ++) {
        UILabel *left = [[UILabel alloc] initWithFrame:CGRectMake(12, 10 + 40 * index, 200, 20)];
        UILabel *right = [[UILabel alloc] initWithFrame:CGRectMake(cx_wid - 12 - 200, 10 + 40 * index, 200, 20)];
        right.textAlignment = NSTextAlignmentRight;
        left.textColor = [CXSinglerModel colorWithHex:@"666666" alpha:1];
        right.textColor = [UIColor blackColor];
        if (index == 0) {
            _timelabel = left;
            left.font = [UIFont systemFontOfSize:16];
            right.frame = CGRectMake(154, 10, 100, 20);
            _idlabel = right;
            
            _idlabel.font = [UIFont systemFontOfSize:10];
            right.textColor = [CXSinglerModel colorWithHex:@"666666" alpha:1];
            _statusBtn = [[UIButton alloc] initWithFrame:CGRectMake(cx_wid - 12 - 52, 1, 52, 26)];
//            [_statusBtn setImage:[UIImage imageNamed:@"tag_review"] forState:UIControlStateNormal];
//            [_statusBtn setImage:[UIImage imageNamed:@"tag_pass"] forState:UIControlStateSelected];
            [self.contentView addSubview:_statusBtn];
        }
        else if (index == 1){
            _cashMoneylabel = right;
            left.text = titles[index];
        }
        else if(index == 2){
            _getCashlabel = right;
            left.text = titles[index];
        }
        [self.contentView addSubview:left];
        [self.contentView addSubview:right];
        UIView *layerView = [[UIView alloc] initWithFrame:CGRectMake(12, 39 + 40 * index, cx_wid - 24, 1)];
        layerView.backgroundColor = bggrayColor;
        [self.contentView addSubview:layerView];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
